<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of courses
 *
 * @author MFerreira
 * 
 */
class courses extends ModuleModel {

    //put your code here
    function GetByPeriodoAcademicoAndPlanEstudio(PeriodoAcademico $PeridoAcademico, $CodigoPlan) {
        return $this->services->Cursos->GetByPeriodoAcademicoAndPlanEstudio($PeridoAcademico, $CodigoPlan);
    }

    function GetByEstudianteAndPeriodoAcademico($CodigoEstudiante, PeriodoAcademico $PeriodoAcademico) {
        return $this->services->Cursos->GetByEstudianteAndPeriodoAcademico($CodigoEstudiante,$PeriodoAcademico);
    }

    function GetById(CursoPk $Id) {
        return $this->services->Cursos->GetById($Id);
    }

    function GetByDocente($NIT) {
        return $this->services->Cursos->GetByDocente($NIT);
    }

    function GetByMateria($codigoMateria, $ajax = false) {
        $service = $this->services->Cursos;
        
        if($ajax){
            $service->setRawMode(true);
        }

        $response = $service->GetByMateria($codigoMateria);
        $service->setRawMode(false);
            
        return $response;
    }
}

?>
